/*
 * RawDexFile.c
 *
 *  Created on: 2011-7-16
 *      Author: gexiao
 */

/*
 * Open an unoptimized DEX file.
 */
#include "Dalvik.h"

/*
 * Open an unoptimized DEX file. This finds the optimized version in the
 * cache, constructing it if necessary.
 */
int dvmRawDexFileOpen(const char* fileName, RawDexFile** ppRawDexFile,
		bool isBootstrap) {
	// TODO - should be very similar to what JarFile does
	return -1;
}

/*
 * Close a RawDexFile and free the struct.
 */
void dvmRawDexFileFree(RawDexFile* pRawDexFile) {
	if (pRawDexFile == NULL)
		return;
	dvmDexFileFree(pRawDexFile->pDvmDex);
	free(pRawDexFile->cacheFileName);
	free(pRawDexFile);
}
